Allow domains to be overridden in <interface>'s if a translation-domain is
authorJohan Dahlin <johan@gnome.org>
Sun, 6 Jan 2008 15:17:26 +0000 (15:17 +0000)
committerJohan Dahlin <johan@src.gnome.org>
Sun, 6 Jan 2008 15:17:26 +0000 (15:17 +0000)
2008-01-06  Johan Dahlin  <johan@gnome.org>

* gtk/gtkbuilderparser.c (parse_interface):
Allow domains to be overridden in <interface>'s if a translation-domain
is set in the builder.
(_gtk_builder_parser_parse_buffer): Do not modify the translation-domain
of the builder, make the domain set in the <interface> apply only to strings
in that interface.
(#496831, Ryan Lortie)

svn path=/trunk/; revision=19316

ChangeLog
gtk/gtkbuilderparser.c

index 8aa862806c7ce151445cfac7bb7c7c3fbb4dc08a..7244227d63a05f851810f0682da723d01fb3a4ec 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2008-01-06  Johan Dahlin  <johan@gnome.org>
 
+       * gtk/gtkbuilderparser.c (parse_interface): 
+       Allow domains to be overridden in <interface>'s if a translation-domain
+       is set in the builder.
+       (_gtk_builder_parser_parse_buffer): Do not modify the translation-domain
+       of the builder, make the domain set in the <interface> apply only to strings
+       in that interface.
+       (#496831, Ryan Lortie)
+
        * gtk/gtkbuilder.c: Avoid adding unnecessary trailing newlines 
        to g_warning calls.
 
index 7f43af64e29c96fa32dd1786f3d24229c4cd9286..ce4b7dbc912bfcce1f869577b207247c99bc489b 100644 (file)
@@ -534,8 +534,9 @@ parse_interface (ParserData   *data,
 
   for (i = 0; names[i] != NULL; i++)
     {
-      if (strcmp (names[i], "domain") == 0 && !data->domain)
+      if (strcmp (names[i], "domain") == 0)
        {
+         g_free (data->domain);
          data->domain = g_strdup (values[i]);
          break;
        }
@@ -962,7 +963,6 @@ _gtk_builder_parser_parse_buffer (GtkBuilder   *builder,
   if (!g_markup_parse_context_parse (data->ctx, buffer, length, error))
     goto out;
   
-  gtk_builder_set_translation_domain (data->builder, data->domain);
   _gtk_builder_finish (builder);
 
   /* Custom parser_finished */